package com.selebash.config;

import com.selebash.Localization;
import com.selebash.features.FeatureFactory;
import java.util.ArrayList;
import java.util.List;

/**
 * @author sad
 */
public class Config {

    private final List<Class> featuresClass = new ArrayList<>();
    private FeatureFactory featureFactory;
    private Localization localization;

    public List<Class> getFeaturesClasses() {
        return featuresClass;
    }
    
    public Config addFeatureClass(Class clazz){
        featuresClass.add(clazz);
        return this;
    }

    public FeatureFactory getFeatureFactory() {
        if(featureFactory==null){
            //attach default feature factory
            featureFactory=new FeatureFactory();
        }
        return featureFactory;
    }

    public void setFeatureFactory(FeatureFactory featureFactory) {
        this.featureFactory = featureFactory;
    }

    
    
    public void setLocalization(Localization localization) {
        this.localization = localization;
    }

    public Localization getLocalization() {
        if (localization == null) {
            localization = new Localization();
        }

        return localization;
    }
}
